﻿@{
    ViewData["Title"] = "获取k3表结构";
}

<script src="~/lib/jquery/dist/jquery.js"></script>
<div class="container">
    <div class="panel panel-info">
        <div class="panel-heading">
            <h2>获取k3表结构</h2>
        </div>
        <div class="row" style="margin-top:10px;margin-left:15px;">
            <div class="form-horizontal col-sm-4">
                <input type="text" id="TableName" name="name" value="" placeholder="请输入要查询的表信息" class="form-control" />
            </div>
            <a class="btn btn-success" id="QueryButton">查询</a>
        </div>

        <div class="panel-body">


            <div class="TableContainer">

            </div>
        </div>
        <div class="panel-footer">

        </div>
    </div>
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header bg-info">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">数据表详细信息</h4>
            </div>
            <div class="modal-body">
                
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                @*<button type="button" class="btn btn-primary">Save changes</button>*@
            </div>
        </div>
    </div>
</div>
<script>
    $("#QueryButton").on("click", function () {
        QueryInfo();
    })

    function QueryInfo() {
        var PostUrl = "/home/GetK3DB";
        var TableName = $("#TableName").val();
        console.log(TableName);
        $.post(PostUrl, { TbInfo: TableName }, function (data) {
            $(".TableContainer").html(data);
        });

    }
</script>
